package org.example.carsystem.controller;

import com.github.pagehelper.PageInfo;
import org.example.carsystem.domain.SysLoginInfor;
import org.example.carsystem.service.SysLoginInforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/ulog")
@CrossOrigin
public class SysLoginInforController {
    @Autowired
    SysLoginInforService sysLoginInforService;
    @RequestMapping("/list")
    public Map<String, Object> list(Integer pageNum, Integer pageSize){
        PageInfo<SysLoginInfor> info = sysLoginInforService.selectAll(pageNum, pageSize);
        HashMap<String, Object> map = new HashMap<>();
        map.put("info",info);
        map.put("code","200");
        return map;
    }
}
